$(document).ready(function() {
//Default Action
	$("#gal_tabs1").fadeOut(10)
	$("#gal_tabs2").fadeOut(10)
	$("#gal_tabs3").fadeOut(10)
	$("#showdata").hide();
	//$("ul.tab li:first").addClass("active").show(); //Activate first tab
	$(".gal_tab_content:first").fadeIn(); //Show first tab content
	
$(".gal_tab a").click(function() {
	
	$(".gal_tab a ").removeClass("sel"); //Remove any "active" class
	$(this).addClass("sel"); //Add "active" class to selected tab
	$(".gal_tab_content").hide(); //Hide all tab content
	var activeTab = $(this).attr("lang"); //Find the rel attribute value to identify the active tab + content
	$(activeTab).fadeIn(); //Fade in the active content
	return false;
});

// class change for carousel
$("#first-carousel a img:first").addClass("sel");
$("#first-carousel a").click(function() {
	var activeImg = $(this).attr("lang");
	activeImg = "images/gallery/big/"+activeImg+".jpg";
	$("#showimg").attr('src',activeImg);
		$("#first-carousel a img").removeClass();
		$(this).children().addClass("sel");
	});
$("#second-carousel a img:first").addClass("sel");
$("#second-carousel a").click(function() {
	var activeImg = $(this).attr("lang");
	activeImg = "images/gallery/big/"+activeImg+".jpg";
	$("#showimg").attr('src',activeImg);
		$("#second-carousel a img").removeClass();
		$(this).children().addClass("sel");
	});
$("#third-carousel a img:first").addClass("sel");
$("#third-carousel a").click(function() {
	var activeImg = $(this).attr("lang");
	activeImg = "images/gallery/big/"+activeImg+".jpg";
	$("#showimg").attr('src',activeImg);
		$("#third-carousel a img").removeClass();
		$(this).children().addClass("sel");
	});


//Default Action
	$(".flr_tab_content").hide()
	//$("ul.tab li:first").addClass("active").show(); //Activate first tab
	$(".flr_tab_content:first").fadeIn(); //Show first tab content
	
$(".flr_tab a").click(function() {
	$(".flr_tab a ").removeClass("sel"); //Remove any "active" class
	$(this).addClass("sel"); //Add "active" class to selected tab
	$(".flr_tab_content").hide(); //Hide all tab content
	var activeTab = $(this).attr("lang"); //Find the rel attribute value to identify the active tab + content
	$(activeTab).fadeIn(); //Fade in the active content
	return false;
});

$("#viewdata").click(function()
  {
	  $("#showdata").slideToggle();
  })



///// form validation


// value reset 
$("#firstname").focus(function()
	{ if( $(this).attr("value")=="first name" ){$(this).attr('value','');}})

$("#firstname").blur(function()
	{ if( $(this).attr("value")=="" ||  $(this).attr("value")=="first name" ){ $(this).attr('value','first name');} })


$(".admn_login").click(function()
	{
		
		var value1 = $("#firstname").attr('value');		
		if( $("#firstname").attr('value') == "" ||  $("#firstname").attr('value') == "first name" )
			{

				$(".login_error").html("please fill first name").show().delay(1000).fadeOut(1000);
			}
	});


});
